<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>文件分类器</title>
    <!-- 引入Bootstrap CSS -->
    <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
    <div class="container mt-5">
        <h1 class="text-center">文件分类器</h1>
        <form action="classify" method="post" class="mt-5">
            <div class="form-group">
                <label for="sourceDir">源目录路径:</label>
                <input type="text" class="form-control" id="sourceDir" name="sourceDir" placeholder="请输入源目录路径">
            </div>
            <button type="submit" class="btn btn-primary">分类文件</button>
        </form>
        <div class="mt-5" id="result">
            <% if (request.getAttribute("result") != null) { %>
                <h2>分类结果:</h2>
                <pre><%= request.getAttribute("result") %></pre>
            <% } %>
        </div>
    </div>
    <!-- 引入Bootstrap JS和依赖 -->
    <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.3/dist/umd/popper.min.js"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
</body>
</html>
